home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 1042 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: mail2news.demon.co.uk!topic.demon.co.uk
  2. From: Mark Paddock <mark@topic.demon.co.uk>
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: List Gadget?
  5. Date: Thu, 11 Jan 96 18:03:20 GMT
  6. Organization: Home
  7. Message-ID: <9601111803.AA000pi@topic.demon.co.uk>
  8. References: <4cr443$6ce@roadkill.scms.rgu.ac.uk> <9601082252.AA000pd@topic.demon.co.uk> <4d2jog$gd6@roadkill.scms.rgu.ac.uk>
  9. X-NNTP-Posting-Host: topic.demon.co.uk
  10. X-Newsreader: TIN [version 1.2 PL3]
  11. X-Mail2News-Path: relay-4.mail.demon.net!post.demon.co.uk!topic.demon.co.uk
  12.  
  13. Lee Kindness (cs2lk@scms.rgu.ac.uk) wrote:
  14. : Mark Paddock (mark@topic.demon.co.uk) wrote:
  15. : : Lee Kindness (cs2lk@scms.rgu.ac.uk) wrote:
  16. : : : I am looking for a listview type gadget, either source
  17. : : : BOOPSI gadget or part of a library.
  18. : : : I would like the following features:
  19. : : : Multi-select
  20. : : You can use a GadTools Listview with GTLV_CallBack.
  21.  
  22. : [ cut ]
  23.  
  24. : Thanks but one major problem is that this would force
  25. : the application to be 3.0+ only and it does not support
  26. : multi-select.
  27.  
  28. It is 3.0+ only but it *does* support multi select.
  29.  
  30. The selection held by Gadtools is ignored and the current
  31. selections are handled internally. The significant code is...
  32.  
  33.     if (!FileName->Selected) {
  34.       SetABPenDrMd(msg->lvdm_RastPort,msg->lvdm_DrawInfo->dri_Pens[TEXTPEN],
  35.                    msg->lvdm_DrawInfo->dri_Pens[BACKGROUNDPEN],JAM2);
  36.     }
  37.     else {
  38.       SetABPenDrMd(msg->lvdm_RastPort,msg->lvdm_DrawInfo->dri_Pens[FILLTEXTPEN],
  39.                    msg->lvdm_DrawInfo->dri_Pens[FILLPEN],JAM2);
  40.     }
  41.  
  42.     and the other checks on ->Selected in the callback.
  43.  
  44. and
  45.  
  46.   if (MyNamep[MPIndexMsg.Code]->Selected) {
  47.     MyNamep[MPIndexMsg.Code]->Selected = FALSE;
  48.   }
  49.   else {
  50.     MyNamep[MPIndexMsg.Code]->Selected = TRUE;
  51.   }
  52.  
  53.   in the message handling routine.
  54.